Question: Let $x,$ $y,$ and $z$ be angles such that
\begin{align*}
\cos x &= \tan y, \\
\cos y &= \tan z, \\
\cos z &= \tan x.
\end{align*}Find the largest possible value of $\sin x.$
Explanation: From $\cos x = \tan y,$
\[\cos^2 x = \tan^2 y = \frac{\sin^2 y}{\cos^2 y} = \frac{1 - \cos^2 y}{\cos^2 y} = \frac{1}{\cos^2 y} - 1.\]Since $\cos y = \tan z,$ $\cos^2 x = \cot^2 y - 1.$  Then
\[1 + \cos^2 x = \cot^2 z = \frac{\cos^2 z}{\sin^2 z} = \frac{\cos^2 z}{1 - \cos^2 z}.\]Since $\cos z = \tan x,$
\[1 + \cos^2 x = \frac{\tan^2 x}{1 - \tan^2 x} = \frac{\sin^2 x}{\cos^2 x - \sin^2 x}.\]We can write this as
\[1 + (1 - \sin^2 x) = \frac{\sin^2 x}{(1 - \sin^2 x) - \sin^2 x},\]so $(2 - \sin^2 x)(1 - 2 \sin^2 x) = \sin^2 x.$  This simplifies to
\[\sin^4 x - 3 \sin^2 x + 1 = 0.\]We recognize this as a quadratic in $\sin^2 x$: $(\sin^2 x)^2 - 3 \sin^2 x + 1 = 0.$  Then by the quadratic formula,
\[\sin^2 x = \frac{3 \pm \sqrt{5}}{2}.\]Since $\frac{3 + \sqrt{5}}{2} > 1,$ we must have
\[\sin^2 x = \frac{3 - \sqrt{5}}{2}.\]We guess that $\sin x$ is of the form $a + b \sqrt{5},$ for some numbers $a$ and $b.$  Thus,
\[(a + b \sqrt{5})^2 = \frac{3 - \sqrt{5}}{2} = \frac{3}{2} - \frac{1}{2} \sqrt{5}.\]Expanding, we get
\[a^2 + 5b^2 + 2ab \sqrt{5} = \frac{3}{2} - \frac{1}{2} \sqrt{5}.\]We set $a^2 + 5b^2 = \frac{3}{2}$ and $2ab = -\frac{1}{2}.$  Then $ab = -\frac{1}{4},$ so $b = -\frac{1}{4a}.$  Substituting into $a^2 + 5b^2 = \frac{3}{2},$ we get
\[a^2 + \frac{5}{16a^2} = \frac{3}{2}.\]Then $16a^4 + 5 = 24a^2,$ so $16a^4 - 24a^2 + 5 = 0.$  This factors as $(4a^2 - 1)(4a^2 - 5) = 0.$  Thus, possible values of $a$ are $\pm \frac{1}{2}.$  Then $b = \mp \frac{1}{2},$ so
\[\sin x = \pm \frac{1 - \sqrt{5}}{2}.\]Let
\[\theta = \arcsin a,\]where $a = \frac{\sqrt{5} - 1}{2}.$  Note that $a$ satisfies $a^2 + a - 1 = 0.$  Then
\begin{align*}
\cos \theta - \tan \theta &= \cos \theta - \frac{\sin \theta}{\cos \theta} \\
&= \frac{\cos^2 \theta - \sin \theta}{\cos \theta} \\
&= \frac{1 - \sin^2 \theta - \sin \theta}{\cos \theta} \\
&= \frac{1 - a^2 - a}{\cos \theta} = 0.
\end{align*}Thus, $(x,y,z) = (\theta, \theta, \theta)$ is a solution to the given system, which means the largest possible value of $\sin x$ is $\boxed{\frac{\sqrt{5} - 1}{2}}.$